package com.czh.intelligentoj.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.czh.intelligentoj.model.dto.question.QuestionQueryRequest;
import com.czh.intelligentoj.model.dto.questionsubmit.QuestionSubmitAddRequest;
import com.czh.intelligentoj.model.dto.questionsubmit.QuestionSubmitQueryRequest;
import com.czh.intelligentoj.model.entity.Question;
import com.czh.intelligentoj.model.entity.QuestionSubmit;
import com.czh.intelligentoj.model.entity.User;
import com.czh.intelligentoj.model.vo.QuestionSubmitVO;
import javax.servlet.http.HttpServletRequest;

/*
 * ClassName: QuestionSubmitService
 * Package: com.czh.intelligentoj.service
 * Description:
 *           题目提交封装类
 * @Author: CZH
 * @Create: 2024
 */
public interface QuestionSubmitService extends IService<QuestionSubmit>{

    /**
     * 题目提交
     *
     * @param questionSubmitAddRequest
     * @param loginUser
     * @return
     */
    Long doQuestionSubmit(QuestionSubmitAddRequest questionSubmitAddRequest, User loginUser);

    /**
     * 获取查询条件
     *
     * @param questionSubmitQueryRequest
     * @return
     */
    QueryWrapper<QuestionSubmit> getQueryWrapper(QuestionSubmitQueryRequest questionSubmitQueryRequest);

    /**
     *  获取题目封装
     * @param questionSubmit
     * @param loginUser
     * @return
     */
    QuestionSubmitVO getQuestionSubmitVO(QuestionSubmit questionSubmit, User loginUser);

    /**
     *  获取题目封装分页
     * @param questionSubmitPage
     * @param loginUser
     * @return
     */
    Page<QuestionSubmitVO> getQuestionSubmitVOPage(Page<QuestionSubmit> questionSubmitPage, User loginUser);

}
